Bump css_parser to 3.0.0 (CVE-2026-53727) - #4353
Conversation
css_parser < 3.0.0 is vulnerable to SSRF and local file disclosure via @import following in attacker-controlled CSS with base_uri: set. While porta's usage is not exploitable (no attacker-controlled CSS, no base_uri: option), bumping to the patched version as defense-in-depth. Also bumps prawn-svg 0.32.0 -> 0.40.3 (required for css_parser >= 2.0 compatibility), along with transitive deps prawn 2.4.0 -> 2.5.0, pdf-core 0.9.0 -> 0.10.0, ttfunk 1.7.0 -> 1.8.0. THREESCALE-15563 Assisted-By: claude-opus-4-6 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
| acts_as_tree (2.9.1) | ||
| activerecord (>= 3.0.0) | ||
| addressable (2.8.8) | ||
| addressable (2.9.0) |
There was a problem hiding this comment.
@jlledom there was something with addressable but I forgot what it was 🤔
❌ 2 blocking issues (2 total)
|
|
|
||
| def traffic_graph_style(svg) | ||
| xml = Nokogiri::XML(svg) | ||
| xml.css('a').each { |a| a.replace(a.children) } |
|
|
||
| def traffic_graph_style(svg) | ||
| xml = Nokogiri::XML(svg) | ||
| xml.css('a').each { |a| a.replace(a.children) } |
There was a problem hiding this comment.
svg-graph wraps data points in elements (empty
URL) when show_data_points is true. prawn-svg 0.32 treated as a plain
container and ignored the href. prawn-svg 0.40 added a new Anchor element
class that creates PDF link annotations from them — even with an empty URL,
PDF viewers render a hover box.
|
Attaching generated test PDFs for comparison. |
jlledom
left a comment
There was a problem hiding this comment.
Code looks good to me. The licenses job is failing, though.
| :versions: [] | ||
| :when: 2026-04-29 07:57:00.547859043 Z | ||
| - - :permit | ||
| - GPL-2.0-only |
a2b8beb to
7a68e6a
Compare
prawn-svg 0.40+ converts <a xlink:href=""> elements into PDF link annotations. svg-graph generates these with empty URLs around data points when show_data_points is true, causing useless black hover boxes in PDF viewers. Strip them in traffic_graph_style which already does Nokogiri SVG manipulation. THREESCALE-15563 Assisted-By: claude-opus-4-6 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
7a68e6a to
96fd318
Compare
Prawn/pdf-core/ttfunk migrated license metadata from deprecated SPDX-style identifiers (GPL-2.0, GPL-3.0) to modern SPDX identifiers (GPL-2.0-only, GPL-3.0-only). LICENSE file has not changed. Existing policy already permits GPL-2.0 and GPL-2.0+, so adding GPL-2.0-only aligns scanner metadata with existing approval policy.
96fd318 to
4e90f3e
Compare
Summary
css_parserfrom 1.21.1 to 3.0.0 to address CVE-2026-53727 (SSRF + local file disclosure via@importfollowing withbase_uri:)prawn-svgfrom 0.32.0 to 0.40.3 (required for css_parser 3.x compatibility)prawn2.4→2.5,pdf-core0.9→0.10,ttfunk1.7→1.8Exploitability assessment
Not exploitable in porta — included as defense-in-depth:
base_uri:option to be setapp/lib/pdf/report.rb) feeds server-generated SVG graph styles into css_parser — no user inputbase_uri:is never passed anywhere in the codebase, so the@import-following code path that triggers SSRF is deadload_uri!orread_remote_fileexist in porta's codeTest plan
css_parser3.0.0 API is backwards-compatible with porta's usage pattern (load_string!,add_block!,each_selector)report.rbcode path (color substitution + hardcoded CSS blocks)THREESCALE-15563
🤖 Generated with Claude Code